<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>henu_oj</title>
	<meta name="keywords" content="" />
	<meta name="description" content="" />
	<link rel="stylesheet" href="__PUBLIC__/source/admin_source/tpl/static/css/bootstrap.min.css" type="text/css" media="all" />
	<link rel="stylesheet" href="__PUBLIC__/source/admin_source/tpl/static/css/jquery-ui.min.css" type="text/css" media="all" />
	<link rel="stylesheet" href="__PUBLIC__/source/admin_source/tpl/Admin/common/css/admin.css" type="text/css" />
</head>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/jquery-1.9.1.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/bootstrap.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/jquery.artDialog.js?skin=aero"></script>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/iframeTools.js"></script>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/jquery.form.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/jquery.validate.min.js"></script>
<script language="javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/jquery.imagePreview.js"></script>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/jquery-ui.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/static/js/datepicker.js"></script>
<script type="text/javascript" src="__PUBLIC__/source/admin_source/tpl/Admin/common/js/common.js"></script>

	<body>
		<!--顶部-->
<nav class="navbar navbar-inverse">
	<div class="container-fluid">
		<div class="navbar-header">
			<a class="navbar-brand" href="<?php echo U('article/showlist');?>">henu_oj后台管理</a>
		</div>

		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav navbar-right">
				<li>
					<a href="http://www.kftxlz.gov.cn" target="_blank"><i class="glyphicon glyphicon-home"></i> 网站首页</a>
				</li>
				<li class="dropdown">
					<a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="glyphicon glyphicon-user"></i>
						<?php echo ($des); ?>【
							<?php echo ($username); ?>】 <span class="caret"></span></a>
					<ul class="dropdown-menu" role="menu">
						<li>
							<a href="<?php echo U('Admin/logout');?>">退出</a>
						</li>
					</ul>
				</li>
			</ul>
		</div>
		<!-- /.navbar-collapse -->
	</div>
	<!-- /.container-fluid -->
</nav>
<!--顶部结束-->
		<div class="container-fluid">
			<div class="row">
				<div class="col-md-2">
	<div id="nav">
		<p id="p_index"><i class="glyphicon glyphicon-home"></i> 前端页面</p>
		<div class="menu_body" id="b_index">
			<li>
				<i class="glyphicon glyphicon-menu-right"></i>
				<a href="<?php echo U('Index/index');?>">首页</a>
			</li>
		</div>
		<p id="p_user"><i class="glyphicon glyphicon-bookmark"></i> 用户管理</p>
		<div class="menu_body" id="b_user">
			<li>
				<a href="<?php echo U('Admin/user_list');?>"><i class="glyphicon glyphicon-menu-right"></i> 用户列表</a>
			</li>
			<li>
				<a href="<?php echo U('Admin/user_add');?>"><i class="glyphicon glyphicon-menu-right"></i> 添加新用户</a>
			</li>
		</div>
		<p id="p_problem"><i class="glyphicon glyphicon-list-alt"></i> 题目管理</p>
		<div class="menu_body" id="b_problem">
			<li>
				<a href="<?php echo U('Admin/problem_list');?>"><i class="glyphicon glyphicon-menu-right"></i> 题目列表</a>
			</li>
			<li>
				<a href="<?php echo U('Admin/problem_add');?>"><i class="glyphicon glyphicon-menu-right"></i> 添加新题目</a>
			</li>
		</div>
		<p id="p_contest"><i class="glyphicon glyphicon-level-up"></i> 竞赛管理</p>
		<div class="menu_body" id="b_contest">
			<li>
				<a href="<?php echo U('Admin/contest_list');?>"><i class="glyphicon glyphicon-menu-right"></i> 竞赛列表</a>
			</li>
			<li>
				<a href="<?php echo U('Admin/contest_add');?>"><i class="glyphicon glyphicon-menu-right"></i> 添加新竞赛</a>
			</li>
		</div>
		<p id="p_class"><i class="glyphicon glyphicon-align-justify"></i> 班级管理</p>
		<div class="menu_body" id="b_class">
			<li>
				<a href="<?php echo U('Admin/class_list');?>"><i class="glyphicon glyphicon-menu-right"></i> 班级列表</a>
			</li>
			<li>
				<a href="<?php echo U('Admin/class_add');?>"><i class="glyphicon glyphicon-menu-right"></i> 添加新班级</a>
			</li>
		</div>
		<p id="p_sys"><i class="glyphicon glyphicon-cog"></i> 系统设置</p>
		<div class="menu_body" id="b_sys">
			<li>
				<a href="<?php echo U('Admin/system_config');?>"><i class="glyphicon glyphicon-menu-right"></i>系统配置信息</a>
			</li>
			<li>
				<a href="<?php echo U('Admin/system_info');?>"><i class="glyphicon glyphicon-menu-right"></i>系统配置信息</a>
			</li>
		</div>
	</div>
</div>
				<div class="col-md-10">

					<ol class="breadcrumb">
						<li>
							用户管理
						</li>
						<li class="active">用户列表</li>
					</ol>
					<script>
						function jumpUrl() {
							var v = document.getElementById("usergroup").options[document.getElementById("usergroup").selectedIndex].value;
							window.location.href = v;
						}
					</script>
					<div class="form-inline">
						<form action="<?php echo U('Admin/user_list');?>" method="post">
							<div class="form-group">
								<label>用户组：</label>
								<select name="usergroup" id="usergroup" class="form-control input-sm" onchange="jumpUrl()">
									<option value="<?php echo U('Admin/user_list');?>" <?php if($nowgroup == 'all'): ?>selected="selected"<?php endif; ?>>全部</option>
									<option value="<?php echo U('Admin/user_list',array('usergroup'=>0));?>" <?php if($nowgroup == '0'): ?>selected="selected"<?php endif; ?>>学生组</option>
									<option value="<?php echo U('Admin/user_list',array('usergroup'=>1));?>" <?php if($nowgroup == '1'): ?>selected="selected"<?php endif; ?>>教师组</option>
									<option value="<?php echo U('Admin/user_list',array('usergroup'=>2));?>" <?php if($nowgroup == '2'): ?>selected="selected"<?php endif; ?>>管理员组</option>
								</select>
							</div>

							<div class="form-group">
								<label>用户id或昵称：</label>
								<input type="text" class="form-control input-sm" name="key" value="<?php echo ($key); ?>">
							</div>
							<button type="submit" class="btn btn-default btn-sm">搜索</button>
						</form>
					</div>

					<p></p>

					<form id="ajaxForm" method="post" action="" name="form1" class="form-horizontal form-validata">
						<TABLE class="table table-striped table-bordered table-hover">
							<THEAD>
								<tr>
									<TH>用户id</TH>
									<TH>昵称</TH>
									<TH>注册ip</TH>
									<TH>注册时间</TH>
									<TH>年级</TH>
									<TH>上次登录ip</TH>
									<TH>上次登录时间</TH>
									<TH>重置密码</TH>
									<TH>删除用户</TH>
								</tr>
							</THEAD>
							<TBODY>
								<?php if(is_array($data)): $i = 0; $__LIST__ = $data;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$ar): $mod = ($i % 2 );++$i;?><tr>
										<td>
											<?php echo ($ar["id"]); ?>
										</td>
										<td>
											<a href="<?php echo U('Admin/user_view',array('id'=>$ar['id']));?>" class="preview" alt="" title="<?php echo ($ar["title"]); ?>">
												<?php echo ($ar["nick"]); ?>
											</a>
										</td>
										<td>
											<?php echo ($ar["reg_ip"]); ?>
										</td>
										<td>
											<?php echo date("Y-m-d H:m:s",$ar['reg_time']); ?>
										</td>
										<td>
											<?php echo $ar['grade']==''?未设置:$ar['grade']; ?>
										</td>
										<td>
											<?php echo $ar['last_login_ip']==''?未登录:$ar['last_login_ip']; ?>
										</td>
										<td>
											<?php echo $ar['last_login_time']==''?未登录:$ar['last_login_time']; ?>
										</td>
										<td>
											<a class="btn btn-xs btn-warning" href="<?php echo U('Admin/setPasswordToDefault',array('id'=>$ar['id']));?>">重置密码</a>
										</td>
										<td>
											<a class="btn btn-xs btn-danger" href="<?php echo U('Article/delete',array('id'=>$ar['id']));?>">删除</a>
										</td>
									</tr><?php endforeach; endif; else: echo "" ;endif; ?>
							</TBODY>
						</TABLE>

						<div class="row">
							<div class="col-md-6">
								<div class="page">
									<nav>
										<ul class="pagination">
											<li>
												<span>第<?php echo ($pagenow); ?>页&nbsp;&nbsp;共<?php echo ($pagenum); ?>页</span>
												<?php $__FOR_START_1021__=1;$__FOR_END_1021__=$pagenum+1;for($i=$__FOR_START_1021__;$i < $__FOR_END_1021__;$i+=1){ ?><a href="<?php echo U('Article/showlist',array('page'=>$i));?>" <?php if($i == $pagenow ): ?>class="now"<?php endif; ?>
														>
														<?php echo ($i); ?>
													</a><?php } ?>
											</li>
										</ul>
									</nav>
								</div>
							</div>
						</div>
					</form>

					<script type="text/javascript">
						$("#path").val("");
					</script>

					<input type="hidden" id="menu_action" value="user" />
				</div>
			</div>

		</div>

		<script type="text/javascript">
	$(document).ready(function() {
		//幻灯片元素与类“menu_body”段与类“menu_head”时点击
		var menu_action = $("#menu_action").val();
		$("#p_" + menu_action).addClass("select");
		$("#b_" + menu_action).show().addClass("local");

		$("#nav p").click(function() {
			$(this).next("div.menu_body").slideToggle(300).siblings("div.menu_body").slideUp("slow");
			$("#nav p").removeClass("select");
			$(this).addClass("select");
			$(this).next("div.menu_body").addClass("local");
		});
	});
</script>

	</body>

</html>